package com.bjpowernode.boss.convert;

import com.bjpowernode.boss.convert.help.CommonFun;
import com.bjpowernode.boss.dao.entity.UserInfo;
import com.bjpowernode.boss.mvc.models.vo.user.UserInfoVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.util.List;

/**
 * @author Mrs.cui
 * 2024-07-11-09-17
 */
@Mapper(componentModel = "spring", uses = {CommonFun.class})
public interface UserConvert {
    List<UserInfoVo> toListUserInfoVo(List<UserInfo> userInfos);

    @Mappings({
            @Mapping(source = "createTime",target = "createTime",dateFormat = "yyyy-MM-dd HH:mm:ss"),
            @Mapping(source = "status",target = "status",qualifiedByName = "transPublicStatus"),

    })
    UserInfoVo mapUserInfoVo(UserInfo userInfo);
}
